package com.shiguiwu.springboot3.search.controller;

import com.shiguiwu.springboot3.search.service.AService;
import com.shiguiwu.springboot3.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 控制层
 * @author: stone
 * @date: Created by 2023/8/29 22:04
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.search.controller
 */
@RestController
@RequestMapping("/a")
public class AController {

    @Autowired
    private AService aService;

    @PostMapping("/save/{a}")
    public R<Integer> saveA(@PathVariable(value = "a") String a) {
        return R.ok(aService.save(a));
    }
}
